Installation
------------

Home directory
^^^^^^^^^^^^^^

Install SieveManager to your home directory::

    make userinstall

The manual pages for SieveManager are copied to :file:`~/.local/share/man`, the
Bash completion script to :file:`~/.local/share/bash-completion/completions`,
and the Zsh completion script to :file:`~/.local/share/zsh-completions`.


Virtual environment
^^^^^^^^^^^^^^^^^^^

Create a virtual environment in :file:`/opt/odkr/sievemgr` and
install SieveManager to that environment::

    sudo make venvdir=/opt/odkr/sievemgr virtinstall

.. TIP::
    Install SieveManager to :file:`/foo` and its manual pages
    and completion scripts to their standard locations in
    :file:`/usr/local`::

        sudo make venvdir=/foo prefix=/usr/local virtinstall


Manual
^^^^^^

SieveManager can also be installed by being copied into a
directory in your :envvar:`PATH`::

    install sievemgr.py ~/.local/bin/sievemgr

However, the cryptography_ module is required to check whether a server's TLS
certificate has been revoked and the dnspython_ module is required to resolve
DNS `SRV records`_. So you should install those modules, too::

    pip3 install --user cryptography dnspython


De-installation
---------------

Uninstall SieveManger::

    make uninstall

.. NOTE::
    The :mod:`cryptography` and :mod:`dnspython` Python modules are
    installed automatically by :command:`make userinstall` as well as
    :command:`make virtinstall`. But they are *not* uninstalled
    by :command:`make uninstall`.


.. _cryptography: https://cryptography.io

.. _dnspython: https://www.dnspython.org
